package com.cole.gx095.Repository;

import com.cole.gx095.entity.PurBillgoods;
import com.cole.gx095.entity.Purchasebill;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface PurBillgoodsRepository extends JpaRepository<PurBillgoods,Integer>, JpaSpecificationExecutor<PurBillgoods> {

    @Query(value = "select * from purbillgoods bg where bg.contractNum = ?1", nativeQuery = true)
    List<PurBillgoods> findAllBycontractNum(String contractNum);
}
